﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin_Course.Master" AutoEventWireup="true" CodeBehind="Admin_Course.aspx.cs" Inherits="TAMS.Admin.Admin_Course1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style15
        {
            width: 100%;
        }
        .style16
        {
            width: 359px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <div align="right" style="height: 22px; background-color: #EFF3FB;">
        <table class="style15">
            <tr>
                <td align="left" class="style16">
                    <asp:Button ID="Button5" runat="server" CssClass="button" Text="Detailed Course Info" 
                        Width="214px" Height="28px" onclick="Button5_Click" />
                </td>
                <td align="right">
                            <asp:Label ID="Label1" runat="server" Text="Label" 
                            style="font-weight: 700; color: #800000"></asp:Label>
            </tr>
            
        </table>
    </div>
    <div style="margin-top: 10px">
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
                AutoGenerateColumns="False" CellPadding="4" 
                DataSourceID="TAMS" ForeColor="#333333" 
                GridLines="None" Width="100%" BorderColor="#B5C7DE" BorderStyle="Solid" 
                BorderWidth="1px" DataKeyNames="Course ID">
        <AlternatingRowStyle BackColor="White" HorizontalAlign="Center" />
        <Columns>
            <asp:BoundField DataField="Course ID" HeaderText="Course ID" 
                SortExpression="Course ID" />
            <asp:BoundField DataField="Course Name" HeaderText="Course Name" 
                SortExpression="Course Name" />

                 <asp:CommandField ButtonType="Button" ShowSelectButton="True">
                    <ControlStyle CssClass="button" Font-Overline="False" Font-Strikeout="False" 
                        Font-Underline="False" />
                    </asp:CommandField>
                    <asp:TemplateField>
                        <ItemTemplate>
                                <asp:Button ID="Details" runat="server" Text="Details" CommandName="Details"  OnClick="details_click" CssClass="button"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                                <asp:Button ID="AddSection" runat="server" Text="Edit Sections" CommandName="addSection"  OnClick="addSection_click" CssClass="button" Width="95px" />
                        </ItemTemplate>
                    </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#97C1F4" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    </div>
    <asp:SqlDataSource ID="TAMS" runat="server" 
    ConnectionString="<%$ ConnectionStrings:TAMSConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:TAMSConnectionString.ProviderName %>" 
    SelectCommand="SELECT SC.cid as 'Course ID', C.cname as 'Course Name'
    FROM Course C, SectionConsists SC, Semester S 
    WHERE SC.cid = C.cid AND SC.semId = S.semId AND S.year=@y AND S.season=@sem 
    GROUP BY SC.cid">
</asp:SqlDataSource>

</asp:Content>
